export V?=0
TEEC_EXPORT = /home/kidds/optee_envri_arm64/optee_client/out/export
CROSS_COMPILE=/home/kidds/testedoptee/toolchains/aarch64/bin/aarch64-linux-gnu-

# If _HOST or _TA specific compilers are not specified, then use CROSS_COMPILE
HOST_CROSS_COMPILE ?= $(CROSS_COMPILE)
TA_CROSS_COMPILE ?= $(CROSS_COMPILE)

.PHONY: all
all:
	$(MAKE) -C qrng CROSS_COMPILE="$(HOST_CROSS_COMPILE)"
	$(MAKE) -C host CROSS_COMPILE="$(HOST_CROSS_COMPILE)"
	$(MAKE) -C talib1 CROSS_COMPILE="$(TA_CROSS_COMPILE)" LDFLAGS=""
	$(MAKE) -C talib2 CROSS_COMPILE="$(TA_CROSS_COMPILE)" LDFLAGS=""
	$(MAKE) -C talib3 CROSS_COMPILE="$(TA_CROSS_COMPILE)" LDFLAGS=""
	$(MAKE) -C ta CROSS_COMPILE="$(TA_CROSS_COMPILE)" LDFLAGS=""
	$(MAKE) -C ta2 CROSS_COMPILE="$(TA_CROSS_COMPILE)" LDFLAGS=""

.PHONY: clean
clean:
	$(MAKE) -C qrng clean
	$(MAKE) -C host clean
	$(MAKE) -C talib1 clean
	$(MAKE) -C talib2 clean
	$(MAKE) -C talib3 clean
	$(MAKE) -C ta clean
	$(MAKE) -C ta2 clean
